package com.jhmk.jhecis.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jhmk.jhecis.domain.TriagePatientvisit;
import com.jhmk.jhecis.service.impl.TriagePatientvisitServiceImpl;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 分诊患者信息表 前端控制器
 * </p>
 *
 * @author yfc
 * @since 2024-09-26
 */
@RestController
@RequestMapping("/triage-patientvisit")
@Tag(name = "分诊信息接口")
@RequiredArgsConstructor // 自动生成构造函数注入
public class TriagePatientvisitController {

    final TriagePatientvisitServiceImpl triagePatientvisitService;

    @GetMapping("getByPatientid")
    @Operation(description = "通过patientid获取一条分诊记录")
    public TriagePatientvisit GetByPatientid(String patientid) {
        QueryWrapper<TriagePatientvisit> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(TriagePatientvisit::getPatientid,patientid);
       return triagePatientvisitService.getOne(queryWrapper);
    }

}
